﻿using SqlSugar;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace ServiceCore.Entity.Model
{
    /// <summary>
    /// 映射表
    /// </summary>
    [DataContract(IsReference = true)]
    [SugarTable("t_map")]
    public class MapInfo
    {
        /// <summary>
        /// 映射表
        /// </summary>
        public MapInfo()
        {
        }

        /// <summary>
        /// id 主键自增长
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] // 指定主键和自增
        [Description("id 主键自增长")]
        [DataMember]
        public System.Int64 Id { get; set; }

        /// <summary>
        /// 关联类别
        /// </summary>
        [DataMember]
        public System.String MapType { get; set; } = "";

        /// <summary>
        /// 关联Id（主）
        /// </summary>
        [DataMember]
        public System.Int64 DataId { get; set; }

        /// <summary>
        /// 关联Id（从）
        /// </summary>
        [DataMember]
        public string BindId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [DataMember]
        public System.Decimal SortBy { get; set; }

        /// <summary>
        /// 关联类别名
        /// </summary>
        [DataMember]
        [SugarColumn(IsIgnore = true)]
        public System.String MapTypeName { get; set; } = "";
        /// <summary>
        /// 关联Id（主）
        /// </summary>
        [DataMember]
        [SugarColumn(IsIgnore = true)]
        public System.String DataName { get; set; } = "";
        /// <summary>
        /// 关联Id（从）
        /// </summary>
        [DataMember]
        [SugarColumn(IsIgnore = true)]
        public System.String BindName { get; set; } = "";

    }
}
